#include "stdio.h"
#include <stdlib.h>
typedef unsigned char *byte_pointer;
void show_bytes(byte_pointer start, int len)
{
    int i;
    printf("len == %d\r\n",len);
    for(i = 0; i < len; i++)
        printf(" %.2x", start[i]);
    printf("\r\n");
}

void show_short(short x)
{
    show_bytes((byte_pointer) &x, sizeof(short));
}

void show_long(long x)
{
    show_bytes((byte_pointer) &x, sizeof(long));
}

void show_double(double x)
{
    show_bytes((byte_pointer) &x, sizeof(double));
}
void main(int argc, char *argv[])
{
    int value;
    if(argc == 2)
    {
        value = atoi(argv[1]);
        printf("show_short(%d):\r\n",value);
        show_short(value);

        printf("show_long(%d):\r\n",value);
        show_long(value);

        printf("show_double(%d):\r\n",value);
        show_double(value);
    }
    else
    {
        printf("Need 2 arguments!\r\n");


    }

}
